package com.lianzhihui.romeex.mvp.presenter;

import android.content.Context;

import com.lianzhihui.romeex.bean.ZZConfigBean;
import com.lianzhihui.romeex.mvp.model.ZZConfigInterface;
import com.lianzhihui.romeex.mvp.model.ZZConfigModel;
import com.lianzhihui.romeex.mvp.view.ZZConfigView;

/**
 * Description:
 * Author: RAMON
 * CreateDate: 2020/11/10 3:44 PM
 * UpdateUser:
 * UpdateDate:
 * UpdateRemark:
 * Version:
 */
public class ZZConfigPresenter implements ZZConfigInterface {

    Context context;
    ZZConfigView iView;
    ZZConfigModel iModel;

    public ZZConfigPresenter(Context context, ZZConfigView iView) {
        this.context = context;
        this.iView = iView;
        iModel = new ZZConfigModel(context, this);
    }

    public void getConfig(String coinName, String coinNameCobo, int type) {
        iModel.getConfig(coinName, coinNameCobo, type);
    }

    @Override
    public void onCoinSuccess(ZZConfigBean bean) {
        iView.onCoinSuccess(bean);
    }

    @Override
    public void onCoinFail(Object obj) {
        iView.onCoinFail(obj);
    }

    @Override
    public void onFailure() {

    }
}
